package com.java.test.system.registrationtemplate.entity;

import lombok.Data;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

/**
 * TypeEntity
 *
 * @author lijie1
 * @version 1.0
 * @date 2020/7/16 0016 16:10
 */
@Data
public class TypeEntity implements RowMapper<TypeEntity> {
    private Long id;
    private String name;
    private String fieldId;
    private String operation;
    private Date modifyTime;
    private Date createTime;
    private int status;
    @Override
    public TypeEntity mapRow(ResultSet resultSet, int i) throws SQLException {
        TypeEntity info = new TypeEntity();
        info.setId(resultSet.getLong("id"));
        info.setName(resultSet.getString("name"));
        info.setFieldId(resultSet.getString("fieldId"));

        info.setOperation(resultSet.getString("operation"));
        info.setModifyTime(resultSet.getDate("modifyTime"));
        info.setCreateTime(resultSet.getDate("createTime"));
        info.setStatus(resultSet.getInt("status"));
        return info;
    }
}
